<%@page pageEncoding="UTF-8" %>
<%@include file="/comm/header.jsp" %>
<div class="container">
    <div id="toolbar">
        <a class="btn btn-primary" onclick="add()"><i class="fa fa-plus"></i>添加角色</a>
        <a class="btn btn-primary" onclick="grant()"><i class="fa fa-user"></i>角色授权</a>
    </div>
    <table id="roleTb"
    data-toggle="table"
    data-url="sys/role/list"
    data-striped="true"
           data-toolbar="#toolbar"
           style="height:280px ">
        <thead>
              <th data-radio="true"></th>
            <th data-field="id">编号</th>
            <th data-field="name">名称</th>
            <th data-field="state" data-formatter="fmtState">状态</th>
            <th data-field="modifyBy">修改人</th>
            <th data-field="modifyTime">修改时间</th>
            <th  data-formatter="optFmt" data-events="optEvents">操作</th>
        </thead>
    </table>
    <div id="add">
    <form class="form-horizontal">
        <div class="form-group">
            <label class="text-right control-label col-md-3">角色名称：</label>
            <div class="col-md-8">
                <input type="text" name="name"/>
            </div>
        </div>
        <div class="form-group">
            <label class="text-right control-label col-md-3">角色状态：</label>
            <div class="col-md-8">
                <label class="radio-inline">
                    <input type="radio" name="state" value="1" checked/>启用
                </label>
                <label class="radio-inline">
                    <input type="radio" name="state" value="0"/>禁用
                </label>
            </div>
        </div>
    </form>
</div>
    <div id="update">
        <form class="form-horizontal">
            <input type="hidden" name="id"/>
            <div class="form-group">
                <label class="text-right control-label col-md-3">角色名称：</label>
                <div class="col-md-8">
                    <input type="text" name="name"/>
                </div>
            </div>
            <div class="form-group">
                <label class="text-right control-label col-md-3">角色状态：</label>
                <div class="col-md-8">
                    <label class="radio-inline">
                        <input type="radio" name="state" value="1" checked/>启用
                    </label>
                    <label class="radio-inline">
                        <input type="radio" name="state" value="0"/>禁用
                    </label>
                </div>
            </div>
        </form>
    </div>


    <div id="grant">
        <div id="tree">
        </div>
    </div>
</div>
<%@include file="/comm/footer.jsp" %>
<script src="${ctx}/static/js/role.js"></script>